{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Figure 3 - User Study"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as pl\n",
    "import numpy as np\n",
    "from collections import Counter\n",
    "\n",
    "# data collected from mechanical turk\n",
    "user_results = [\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 20, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 45, \"fever_credit\": 15},\n",
    "    {\"cough_credit\": 20, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 60, \"fever_credit\": 20},\n",
    "    {\"cough_credit\": 80, \"fever_credit\": 20},\n",
    "    {\"cough_credit\": 40, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 20, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 20, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 10, \"fever_credit\": 50},\n",
    "    {\"cough_credit\": 80, \"fever_credit\": 0},\n",
    "    {\"cough_credit\": 40, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 40, \"fever_credit\": 20},\n",
    "    {\"cough_credit\": 35, \"fever_credit\": 25},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 20, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 40, \"fever_credit\": 20},\n",
    "    {\"cough_credit\": 20, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 20, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 20, \"fever_credit\": 40},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 40, \"fever_credit\": 20},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30},\n",
    "    {\"cough_credit\": 35, \"fever_credit\": 25},\n",
    "    {\"cough_credit\": 40, \"fever_credit\": 20},\n",
    "    {\"cough_credit\": 60, \"fever_credit\": 20},\n",
    "    {\"cough_credit\": 30, \"fever_credit\": 30}\n",
    "]\n",
    "\n",
    "vals = [str(r[\"fever_credit\"])+\"_\"+str(r[\"cough_credit\"]) for r in user_results]\n",
    "c = Counter(vals)\n",
    "counts = list(c.items())\n",
    "counts.sort(key=lambda x: -x[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Build the plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATEAAAD0CAYAAADzNxHbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcFNXV//HPl30VNSwiOuAGEVGIgmQxiHEjiruBGGNE\norjEXYNG/SVo3BJ9YmJ8ngguwQ1ETNSoBHfBfQEHo7gjiIoiKgKiAeT8/rh3hqaZpWa6q3t65rxf\nr35NTVX3qdPV3aerqm/dKzPDOedKVbNiJ+Ccc7nwIuacK2lexJxzJc2LmHOupHkRc86VNC9izrmS\n5kXMOVfSvIg550qaFzHnXElrUewE6mrYsGE2ffr0YqfhnEufktyp5PbElixZUuwUnHMNSMkVMeec\ny+RFzDlX0ryIOedKWkGKmKQbJS2W9ErGvCskvS7pZUl3Sdq4ELk45xqXQu2JTQSGZc17COhnZjsB\nbwK/KVAuzrlGpCBFzMxmAp9lzXvQzNbEf58FtihELs65xqWhtBMbDUypbqGkMcAYgLKysg2W73LN\nRyz5cm2dV9q5fTNmnbxZnR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ZX++zCO/Bii/ZcuBn8THDWP+Q/Q7gmLit2hFOSyQWt9WmhPOEOWm0RSw6h3Ci\n8tl42PEwYe8LwonztoRvqmcJh5qZ/kI4Z/G5pIo2Z8cBvyYUmh2opRcAM7sL+ANwe1z/K4Q3WFVu\nJux5fED4RSz7xb2BcH5mqaS747zLgAvivLNryiXLLYQTrx8RvvVPjfl+AZwEXB/z+JJ1Yy3CukLy\nqaSqzg/dGGPPBN4l7AGcUoe8sk0mfHAeNbMlGfPPJuydLSd8UU2pIcZVhF8JPwZuYt1hGvEwbh/C\nYdyHhO3xB9YV7qOA+fG1O4FwGLcBM1tF2J4/ryGPvxBOZD8oaTnh9R2cEeO/hB9C9iJjrzNBjuuR\n1A9YYWbvZcw+m9D31wuEUxp/IHSj80bM+a+Ez8EBwAHx+UD4AjmAcMh3JGFvtCKvfwNXE/YY32bd\n+zXpYLw/I/TNn/sI8PFXAudcDmLr8yeA79Twg0oh8hgLdDazsQVe7/aEL+nWte15x73AOcAQM1uc\n87q9iDnXeEgaQegR9rUCrOsQwmFwO8Je7lrLYQi4eufhRcw5Vx+SpgPfI/zKOgM4ycwWFTwPL2LO\nuVLW2E/sO+caOS9izrmS5kXMOVfSvIg550qaFzHnXEn7/25yssnQhXbDAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x118bb7cf8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = pl.subplots(figsize=(4.5,3.2))\n",
    "\n",
    "bar_list = pl.bar(np.array(range(len(counts)))*5+2.5, [c[1] for c in counts], width=3)\n",
    "[x.set_color('#bbbbbb') for x in bar_list]\n",
    "bar_list[0].set_color('#1E88E5')\n",
    "bar_list[2].set_color('#F52757')\n",
    "\n",
    "import matplotlib.patches as mpatches\n",
    "\n",
    "shap_patch = mpatches.Patch(color='#1E88E5', label='SHAP')\n",
    "path_patch = mpatches.Patch(color='#F52757', label='Saabas')\n",
    "other_patch = mpatches.Patch(color='#bbbbbb', label='Other')\n",
    "pl.legend(handles=[shap_patch,path_patch,other_patch], frameon=False)\n",
    "\n",
    "\n",
    "pl.tick_params(\n",
    "    axis='x',          # changes apply to the x-axis\n",
    "    which='both',      # both major and minor ticks are affected\n",
    "    bottom='off',      # ticks along the bottom edge are off\n",
    "    top='off',         # ticks along the top edge are off\n",
    "    labelbottom='on') # labels along the bottom edge are off\n",
    "pl.tick_params(\n",
    "    axis='y',          # changes apply to the x-axis\n",
    "    which='both',      # both major and minor ticks are affected\n",
    "    left='on',      # ticks along the bottom edge are off\n",
    "    right='off',         # ticks along the top edge are off\n",
    "    labelbottom='on') # labels along the bottom edge are off\n",
    "\n",
    "ax.spines['top'].set_visible(False)\n",
    "ax.spines['right'].set_visible(False)\n",
    "ax.spines['left'].set_visible(True)\n",
    "pl.xticks(np.array(range(len(counts)))*5+4, [c[0].replace(\"_\", \"/\") for c in counts], fontsize=10, rotation='vertical')\n",
    "pl.ylabel(\"# of respondents\", fontsize=12)\n",
    "pl.xlabel(\"feature attribution values (fever/cough)\", fontsize=12)\n",
    "pl.xlim(0,53)\n",
    "#plt.savefig(\"tree_max.pdf\")\n",
    "pl.show()"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [default]",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
